home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c
- Path: howland.reston.ans.net!torn!sq!msb
- From: msb@sq.com (Mark Brader)
- Subject: Re: CLOCKS_PER_SEC not defined
- Message-ID: <1996Feb19.193805.8602@sq.com>
- Organization: SoftQuad Inc., Toronto, Canada
- References: <ramin.1174728902A@news.gsfc.nasa.gov> <4g8puk$2ce@usenet.pa.dec.com>
- Date: Mon, 19 Feb 1996 19:38:05 GMT
-
- > Some non-conforming implementations define __STDC__ with value 0 just
- > to be malicious. Some non-conforming implementations define __STDC__
- > with value 1 in order to be fraudulent.
-
- Or, in each case, because they thought it was in the programmer's
- best interest to do so -- i.e. they thought they knew exactly what a
- programmer's reason for checking __STDC__ would be. Or, in the second
- case, because they intended the implementation to be conforming, but
- one or more bugs kept it from being so. Depending on the actual case,
- words like "ill-advised" or even "highly stupid and unprofessional"
- might be justified, but to go beyond them to "malicious" or "fraudulent"
- looks to me like libel.
-
- Of course, if one has evidence of malice or fraud, that's different.
-
- > The C standard cannot constrain non-conforming implementations but you
- > can demand a refund from a fraudulent vendor.
-
- You can also contact the police or other applicable authorities.
- Fraud is a crime here and anywhere else that I know about.
-
- > Try:
- > #include <time.h>
- > #if defined(__STDC__) && __STDC__ == 1 && !defined(CLOCKS_PER_SEC)
- > #error "Get a refund from the fraudulent vendor of this implementation"
- > #endif
-
- If we're talking about malice, this isn't sufficient. If __STDC__ was
- defined as 1&&1, it would violate the standard's requirement on a
- conforming implementation and thus not claim conformance; but the
- above line would not distinguish it from 1, and would act as if
- conformance had been indicated. To avoid this sort of thing, you
- have would to stringify __STDC__ and test against "1".
-
- --
- Mark Brader, msb@sq.com | "Anyone who can handle a needle convincingly can make
- SoftQuad Inc., Toronto | us see a thread which is not there." --E.H. Gombrich
-
- My text in this article is in the public domain.
-